Use gdk_window_get_effective_toplevel when looking for
a suitable transient parent, to skip over offscreen windows
that we might encounter in the window tree. This fixes
a crash in glade.
https://bugzilla.gnome.org/show_bug.cgi?id=763110
}
if (transient_for)
- transient_for = get_popup_parent (gdk_window_get_toplevel (transient_for));
+ transient_for = get_popup_parent (gdk_window_get_effective_toplevel (transient_for));
/* If the position was not explicitly set, start the popup at the
* position of the device that holds the grab.